import Vue from 'vue'
import VueRouter from 'vue-router'
import TabBar from '../views/TabBar.vue'
import {  Col,Row,Popup,Icon   } from 'vant';

Vue.use(VueRouter)
Vue.use(Col);
Vue.use(Row);
Vue.use(Popup);
Vue.use(Icon);
const routes = [
  {
    path: '/',
    component: TabBar,
	//配置子路由
	children:[
		{
			path:'',
			name:'homePage',
			component:()=>import('../views/HomePage.vue')
			
		},
		{
			path:'orderPage',
			name:'orderPage',
			component:()=>import('../views/OrderPage.vue')
			
		},{
			path:'orderListPage',
			name:'orderListPage',
			component:()=>import('../views/OrderListPage.vue')
			
		},{
			path:'myPage',
			name:'myPage',
			component:()=>import('../views/MyPage.vue')
			
		},
	]
  },
  {
  	path:'/addressPage',
  	name:'addressPage',
  	component:()=>import('../views/AddressPage.vue')
  	
  },
  {
  	path:'/settlePage',
  	name:'settlePage',
  	component:()=>import('../views/SettlePage.vue')
  } ,
  {
  	path:'/creditPage',
  	name:'creditPage',
  	component:()=>import('../views/CreditPage.vue')
  },
  {
  	path:'/accountPage',
  	name:'accountPage',
  	component:()=>import('../views/AccountPage.vue')
  },
  {
  	path:'/discountPage',
  	name:'discountPage',
  	component:()=>import('../views/DiscountPage.vue')
  }, {
  	path:'/vipMaskPage',
  	name:'vipMaskPage',
  	component:()=>import('../views/VipMaskPage.vue')
  },
   {
  	path:'/reciveAddressPage',
  	name:'reciveAddressPage',
  	component:()=>import('../views/ReciveAddressPage.vue')
  },{
  	path:'/infoPage',
  	name:'infoPage',
  	component:()=>import('../views/InfoPage.vue')
  },{
  	path:'/changePhonePage',
  	name:'changePhonePage',
  	component:()=>import('../views/ChangePhonePage.vue')
  },
  
]
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
